home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / zapem-0.000 / zapem-0 / zapem / soul.h < prev    next >
C/C++ Source or Header  |  1995-02-22  |  765b  |  33 lines

  1. #ifndef SOUL_H
  2. #define SOUL_H
  3.  
  4. /* Defines a soul for aliens and players, so that hopefully weapons will be
  5.    interchangeable from the computer and player */
  6.  
  7. class
  8. Soul
  9. {
  10. private:
  11.     int lives, energy;    // current number of lives and enrgy points
  12.     int score, maxenergy;    // score, and energy when starting a new life
  13.     int value;        // value when hit
  14. public:
  15.     Soul(int lives, int menergy, int val);
  16.         Soul(const Soul& s);
  17.         Soul& operator=(const Soul& s);
  18.     void copy(const Soul& s);
  19.  
  20.     int getScore(void) const {return score;}
  21.     int getLives(void) const {return lives;}
  22.  
  23.     void setScore(int s){score=s;}
  24.     void setLives(int l){lives=l;}
  25.     void addScore(int s){score+=s;}
  26.     void subScore(int s){score-=s;}
  27.  
  28.     void subEnergy(int e);
  29.     void addEnergy(int e);
  30. };
  31.  
  32. #endif
  33.